﻿@{
    Layout = null;
}

@*查询统计*@
@Content.Script(Url, "AntiFake/QueryStatistics.js")
<link href="~/Scripts/Bootstrap/css/bootstrap-datepicker3.min.css" rel="stylesheet" />
<script src="~/Scripts/Bootstrap/js/bootstrap-datepicker.js"></script>
<script>
    function showPanel(obj) {
        $(obj).parent().parent().nextAll('.panel-collapse').toggle();
    }
</script>
    
<div class="mtlr15">
    <form id="SearchForm" role="form" onkeydown="if(event.keyCode==13){return false;}">
        <div class="row">
            <div class="col-lg-7 col-md-7 col-sm-7" style="padding:0">
                <button type="button" class="btn btn-success" onclick="$.MGJ.QueryStatistics.ExportExecl('#AntiFakeTable')">
                    <i class="glyphicon glyphicon-arrow-down"></i>
                    导出EXCEL
                </button>
            </div>
            <div class="col-lg-5 col-md-5 col-sm-5">
                <div class="input-group">
                    <div style="width:100%;display:none"></div>
                    <input type="text" class="form-control" id="Fw_SCode" name="Fw_SCode" placeholder="防伪码" onkeydown="if (event.keyCode == 13) { $.MGJ.QueryStatistics.Ajax_PageList(1); }">
                    <span id="serbtn" class="input-group-addon" onclick="$.MGJ.QueryStatistics.Ajax_PageList(1);">
                        <span class="glyphicon glyphicon-search"></span>
                    </span>
                    <div class="input-group-btn" style="margin-left:1px;" onclick="detailSearch(this)">
                        <button type="button" class="btn btn-default" style="border: 1px solid transparent;">
                            更多搜索
                            <span class="caret"></span>
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <div class="detail-search-con" style="display:none">
            <div class="row newrow">
                <div class="col-lg-1 col-md-1 col-sm-1 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 text-right" style="padding:0">
                    开始时间
                </div>
                <div class="col-lg-2 col-md-2 col-sm-2">
                    <input id="StartDate" type="text" name="StartDate" class="form-control" placeholder="开始时间" />
                </div>
                <div class="col-lg-1 col-md-1 col-sm-1 col-sm-2 text-right" style="padding:0">
                    结束时间
                </div>

                <div class="col-lg-2 col-md-2 col-sm-2 col-sm-3">
                    <input id="EndDate" type="text" name="EndDate" class="form-control" placeholder="结束时间" />
                </div>
                @*<div class="col-lg-1 col-md-1 col-sm-1 col-sm-2 text-right" style="padding:0">
                        防伪码
                    </div>

                    <div class="col-lg-2 col-md-2 col-sm-2 col-sm-2">
                        <input type="text" name="Fw_SCode" class="form-control" placeholder="防伪码" />
                    </div>*@

            </div>
            <div class="row newrow">
                <div class="col-lg-1 col-md-1 col-sm-1 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 text-right" style="padding:0">
                    查询结果
                </div>
                <div class="col-lg-2 col-md-2 col-sm-2 col-sm-2">
                    <input type="text" name="Valid" class="form-control" value="真" disabled="disabled" />
                </div>
                <div class="col-lg-1 col-md-1 col-sm-1 text-right" style="padding:0">
                    查询方式
                </div>
                <div class="col-lg-2 col-md-2 col-sm-2 col-sm-2">
                    <select name="QueryType" id="QueryType" class="form-control">
                        <option value="0">微信</option>
                        <option value="1">网站</option>
                        <option value="2">短信</option>
                        <option value="3">电话</option>
                        <option value="4">Wap</option>
                    </select>
                </div>

                <div class="col-lg-2 col-md-2 col-sm-2 col-sm-2 text-center">
                    <button type="button" class="btn btn-default" style="margin-left:23px;" onclick="$.MGJ.QueryStatistics.Ajax_PageList(1, '');">
                        <span class="glyphicon glyphicon-search"></span>
                        搜索
                    </button>
                    <button type="reset" class="btn btn-default">
                        重置
                    </button>
                </div>
            </div>
            @*<div class="row newrow">
                    <div class="col-lg-1 col-md-1 col-sm-1 col-lg-offset-1 col-md-offset-1 col-sm-offset-1 text-right" style="padding:0">
                        查询地区
                    </div>
                    <div class="col-lg-2 col-md-2 col-sm-2 col-sm-2">
                        <select name="ImportStatus" class="form-control" /></select>
                    </div>
                    <div class="col-lg-2 col-md-2 col-sm-2 col-sm-2 text-center">
                        <button type="button" class="btn btn-default" style="margin-left:23px;" onclick="$.MGJ.ReturnProduct.Ajax_SearchPageList(1);">
                            <span class="glyphicon glyphicon-search"></span>
                            搜索
                        </button>
                        <button type="reset" class="btn btn-default">
                            重置
                        </button>
                    </div>
                </div>*@
        </div>
    </form>

    <div id="Table">
        <div class="overflow">
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>防伪码</th>
                        <th>图标</th>
                        <th>查询类型</th>
                        <th>查询者</th>
                        <th>查询时间</th>
                        <th>归属地</th>
                        <th>返回结果</th>
                    </tr>
                </thead>
                <tbody id="AntiFakeTable" style="display:none;" binding="{'pageId':'ShoppingPager','pageCallback':'$.MGJ.QueryStatistics.Ajax_PageList','emptyHtml':AID_EmptyHtml}">
                    <tr>
                        <td binding="{'text':'Fw_SCode'}"> </td>
                        <td>
                            <img class="HeadImgUrl" binding="{'text':'QueryType','src':'HeadImgUrl'}" alt="null" style="width:30px;height:30px;" />
                        </td>                      
                        <td class="QueryType" binding="{'text':'QueryType'}"></td>
                        <td binding="{'text':'QueryIp'}"></td>
                        <td binding="{'text':'QueryTime','textHandle':'datetime'}"></td>
                        <td binding="{'text':'QueryProvince','title':'QueryProvince'}"></td>
                        <td class="Valid" binding="{'text':'Valid'}"></td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="ShoppingPager"></div>
    </div>
</div>
<script>
    var ColspanNub = $(".table.table-hover.table-bordered").find("tr").children("td").length
    window.AID_EmptyHtml = '<tr><td colspan="' + ColspanNub + '"><p class="no-result">无符合条件的数据结果</p></td></tr>';

    $(function () {
        $.MGJ.QueryStatistics.Ajax_PageList(1);
    })

    $("#StartDate").datepicker({
        format: "yyyy-mm-dd",
        language: 'cn',
        todayBtn: "linked",
        autoclose: true,
        todayHighlight: true,
        endDate: new Date()
    }).on('changeDate', function (e) {
        var startTime = e.date;
        $('#EndDate').datepicker('setStartDate', startTime);
    });
    $("#EndDate").datepicker({
        format: "yyyy-mm-dd",
        language: 'cn',
        todayBtn: "linked",
        autoclose: true,
        todayHighlight: true,
        endDate: new Date()
    }).on('changeDate', function (e) {
        var endTime = e.date;
        $('#StartDate').datepicker('setEndDate', endTime);
    });
</script>




        
           